From 8b816120b1895b95923bfc791f8ce874e1c58af2 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Tue, 31 Mar 2009 13:14:10 +0100 Subject: [PATCH] x86: small adjustment to asm constraints for c/s 19400 Properly indicate the variable that the asm writes to, and allow compiler more freedom in selecting a suitable input operand for the ltr instruction. Signed-off-by: Jan Beulich --- xen/arch/x86/traps.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/traps.c b/xen/arch/x86/traps.c index dfdc7bf044..360b46bf26 100644 --- a/xen/arch/x86/traps.c +++ b/xen/arch/x86/traps.c @@ -3048,8 +3048,8 @@ void load_TR(void) /* Switch to non-compat GDT (which has B bit clear) to execute LTR. */ asm volatile ( - "sgdt %1; lgdt %2; ltr %%ax; lgdt %1" - : : "a" (TSS_ENTRY << 3), "m" (old_gdt), "m" (tss_gdt) : "memory" ); + "sgdt %0; lgdt %2; ltr %w1; lgdt %0" + : "=m" (old_gdt) : "rm" (TSS_ENTRY << 3), "m" (tss_gdt) : "memory" ); } void __devinit percpu_traps_init(void) -- 2.30.2